#!/bin/env python
#_*_ coding:utf-8 _*_

import linecache

def countnum(filename):
	files = open(filename)
	data = files.read()
	files.close()
	return data.count('\n')

def cut(filename):
	files = open(filename)
	for line in range(1,countnum(filename)+1):
		linecache.clearcache()
		result.append(list(map(linecache.getline(filename,line).split('/')[3])))   
	files.close()




#!/bin/bash

datetime=`date +"%H:%M:%S"`

echo "===========$datetime===========" >> /opt/shell/top_cut.txt
/usr/bin/top -m -n 1 -b >> /opt/shell/top_cut.txt
echo "=============end===============" >> /opt/shell/top_cut.txt